<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>

<!DOCTYPE html>
<html>    
    <head>        
        <title>Property Status Update | Rentpad.com.ph</title>
        <meta name="viewport" content="width=device-width, initial-scale=1"> 
        <meta name="description" content="Edit Listing" />

        <link rel="stylesheet" href="${model.props.appPath}/css/jquery_mobile/jquery.mobile-1.2.1.min.css" type="text/css"/>        
        <style>
            a {color:#404042;text-decoration:none;}      /* unvisited link */
            @font-face
            {
                font-family: avant;
                src: url('${model.props.appPath}/fonts/avangmi-webfont.ttf');
            }
            body  * {
                font-family: avant !important;
            }
        </style>

        <script type="text/javascript" src="${model.props.appPath}/js/jquery/jquery-1.8.3.min.js"></script>
        <script type="text/javascript" src="${model.props.appPath}/js/jquery_mobile/jquery.mobile-1.2.1.min.js"></script>

        <%@ include file="include/listingedit_mobile_incl.jsp" %> 

        <link rel="stylesheet" href="css/bootstrap/prettify.css" rel="stylesheet">
        <link rel="stylesheet" href="css/bootstrap/index.css" rel="stylesheet">

        <script src="js/bootstrap/bootstrap.min.js"></script>
        <script src="js/bootstrap/bootstrap-wysiwyg.js"></script>
        <script src="js/bootstrap/jquery.hotkeys.js"></script>

        <script>
            function switchMenu() {
                if ($('#menu').is(':visible')) {
                    $("#menu").hide();
                }
                else {
                    $("#menu").show();
                }
            }
        </script>

        <script>
            (function(i, s, o, g, r, a, m) {
                i['GoogleAnalyticsObject'] = r;
                i[r] = i[r] || function() {
                    (i[r].q = i[r].q || []).push(arguments)
                }, i[r].l = 1 * new Date();
                a = s.createElement(o),
                        m = s.getElementsByTagName(o)[0];
                a.async = 1;
                a.src = g;
                m.parentNode.insertBefore(a, m)
            })(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
            ga('create', 'UA-44197833-1', 'rentpad.com.ph');
            ga('send', 'pageview');
        </script>

    </head>

    <body>
        <div data-role="page" data-theme="d">

            <%@include file="header_mobile.jsp" %>

            <div data-role="header" data-theme="c">
                <p style="color: #666666; font-size: 16px; text-align: center;">Update Successful</p>   
            </div>

            <div data-role="content" style="background-color: #ffffff">
                                 
                <c:choose>

                    <c:when test="${model.availability==2}">                                        
                        <p>Your property is now marked as <b style="color: red;">NOT Available / Rented Out</b></p>
                        <p>You can now view your updated properties page via <a href="${model.props.appPath}/account.htm" style="color: #369;" target="blank">Listings Manager</a>.</p>
                        <p>Note: This does not mean that your property is already deleted. When time comes that it is available again, just switch to available.</p>
                    </c:when>

                    <c:otherwise>                                
                        <table style="width:100%" cellpadding="5" cellspacing="5">
                            <tr>
                                <td>

                                    <p style="font-size: 14px">Your property's availability will stay marked as <b style="color: darkgreen;">Available</b></p>
                                    <p style="font-size: 14px">You can now view your updated properties page via <a href="${model.props.appPath}/account.htm" style="color: #369;" target="blank">Listings Manager</a>.</p>
                                    
                                    <span style="font-size: 14px">Note: To get more people to see your listing, <b>share this with your Facebook groups and Twitter followers</b>.</span>
                                    <hr>
                                </td>
                            </tr>
                        </table>

                        <br>

                        <table style="width:100%" cellpadding="5" cellspacing="5">
                            <tr>
                                <td align="center" style="width:45%">
                                    <a href="#" 
                                       onclick="
                                       window.open(
                                       'https://www.facebook.com/sharer/sharer.php?u='+encodeURIComponent('${model.props.appPath}/long-term-rentals/${fn:toLowerCase(model.listing.city)}/${model.listing.urlTitle}/${model.listing.id}'), 
                                       'facebook-share-dialog', 
                                       'width=626,height=436'); 
                                       return false;">
                                       <img src="${model.props.appPath}/img/btn-facebook-share.jpg" />
                                    </a>
                                </td>
                            </tr>                                
                            <tr>
                                <td align="center">
                                    <a href="#" 
                                       onclick="
                                       window.open(
                                       'http://twitter.com/intent/tweet?text=${model.listing.title}&url=${model.props.appPath}/long-term-rentals/${fn:toLowerCase(fn:trim(model.listing.city))}/${model.listing.urlTitle}/${model.listing.id}', 
                                       'twitter-share-dialog', 
                                       'width=626,height=436'); 
                                       return false;">
                                       <img src="${model.props.appPath}/img/btn-twitter-share.jpg" />
                                    </a>
                                </td>
                            </tr>
                        </table>  
                    </c:otherwise>
                </c:choose>
                                    
                <table cellpadding="5px" cellspacing="5px" style="width:100%">
                    <tr>
                        <td>

                            <br><br>

                            <div style="background-color: #eaeaea; padding:10px;">
                            <p style="font-size: 14px">
                                Do you have other new properties you want to add on Rentpad? 
                                &nbsp;<br><br>
                                <a href="#" data-role="button" data-theme="a" onclick="window.location='${model.props.appPath}/listing.htm?a=2&id=${model.listing.id}'" style="width: 95%; margin-left: 2%;">Post another property</a>  
                            </p>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td align="right"><a href="http://rentpad.com.ph" style="color: #369"><u>Back to Home</u></a></td>
                    </tr>
                </table>
                             
            </div>

            <br>            

            

            <br>
                      
            <div data-role="footer">
                <%@include file="footer_mobile.jsp" %>      
            </div>

        </div>
    </body>
</html>
